package com.study.model.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.fasterxml.jackson.annotation.JsonBackReference;

import java.util.List;


/**
 * The persistent class for the linkman database table.
 * 
 */
@Entity
@NamedQuery(name="Linkman.findAll", query="SELECT l FROM Linkman l")
public class Linkman implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="lin_id")
	private int linId;

	@Column(name="lin_character")
	private String linCharacter;

	@Column(name="lin_department")
	private String linDepartment;

	@Column(name="lin_duty")
	private String linDuty;

	@Column(name="lin_email")
	private String linEmail;

	@Column(name="lin_habit")
	private String linHabit;

	@Column(name="lin_hobby")
	private String linHobby;

	@Column(name="lin_home_phone")
	private String linHomePhone;

	@Column(name="lin_id_card")
	private String linIdCard;

	@Column(name="lin_img")
	private String linImg;

	@Column(name="lin_interest")
	private String linInterest;

	@Column(name="lin_name")
	private String linName;

	@Column(name="lin_phone")
	private String linPhone;

	@Column(name="lin_remark")
	private String linRemark;

	@Column(name="lin_responsible")
	private String linResponsible;

	@Column(name="lin_show")
	private int linShow;

	@Column(name="lin_title")
	private String linTitle;

	@Column(name="lin_trait")
	private String linTrait;

	@Column(name="lin_we_chat")
	private String linWeChat;

	@Column(name="lin_work_phone")
	private String linWorkPhone;

	@Column(name="lin_year_income")
	private String linYearIncome;

	//bi-directional many-to-one association to Anniversary
	@OneToMany(mappedBy="linkman")
	private List<Anniversary> anniversaries;

	//bi-directional many-to-one association to Backlog
	@OneToMany(mappedBy="linkman")
	private List<Backlog> backlogs;

	//bi-directional many-to-one association to Addresdetail
	@ManyToOne
	@JoinColumn(name="ad_id")
	private Addresdetail addresdetail;

	//bi-directional many-to-one association to Customer
	@ManyToOne
	@JoinColumn(name="cus_id")
	private Customer customer;

	//bi-directional many-to-one association to Dictionary
	@ManyToOne
	@JoinColumn(name="lin_consumption_habit")
	private Dictionary dictionary1;

	//bi-directional many-to-one association to Dictionary
	@ManyToOne
	@JoinColumn(name="lin_classify")
	private Dictionary dictionary2;

	//bi-directional many-to-one association to Dictionary
	@ManyToOne
	@JoinColumn(name="lin_sex")
	private Dictionary dictionary3;

	//bi-directional many-to-one association to Dictionary
	@ManyToOne
	@JoinColumn(name="lin_type")
	private Dictionary dictionary4;

	//bi-directional many-to-one association to Dictionary
	@ManyToOne
	@JoinColumn(name="lin_id_cardtype")
	private Dictionary dictionary5;

	//bi-directional many-to-one association to TArea
	@ManyToOne
	@JoinColumn(name="lin_postcode")
	private TArea TArea;

	//bi-directional many-to-one association to Opportunity
	@OneToMany(mappedBy="linkman")
	private List<Opportunity> opportunitys;

	//bi-directional many-to-one association to Orderform
	@OneToMany(mappedBy="linkman")
	private List<Orderform> orderforms;

	//bi-directional many-to-one association to Repairlist
	@OneToMany(mappedBy="linkman")
	private List<Repairlist> repairlists;

	//bi-directional many-to-one association to Service
	@OneToMany(mappedBy="linkman")
	private List<Service> services;

	public Linkman() {
	}

	public int getLinId() {
		return this.linId;
	}

	public void setLinId(int linId) {
		this.linId = linId;
	}

	public String getLinCharacter() {
		return this.linCharacter;
	}

	public void setLinCharacter(String linCharacter) {
		this.linCharacter = linCharacter;
	}

	public String getLinDepartment() {
		return this.linDepartment;
	}

	public void setLinDepartment(String linDepartment) {
		this.linDepartment = linDepartment;
	}

	public String getLinDuty() {
		return this.linDuty;
	}

	public void setLinDuty(String linDuty) {
		this.linDuty = linDuty;
	}

	public String getLinEmail() {
		return this.linEmail;
	}

	public void setLinEmail(String linEmail) {
		this.linEmail = linEmail;
	}

	public String getLinHabit() {
		return this.linHabit;
	}

	public void setLinHabit(String linHabit) {
		this.linHabit = linHabit;
	}

	public String getLinHobby() {
		return this.linHobby;
	}

	public void setLinHobby(String linHobby) {
		this.linHobby = linHobby;
	}

	public String getLinHomePhone() {
		return this.linHomePhone;
	}

	public void setLinHomePhone(String linHomePhone) {
		this.linHomePhone = linHomePhone;
	}


	public String getLinIdCard() {
		return this.linIdCard;
	}

	public void setLinIdCard(String linIdCard) {
		this.linIdCard = linIdCard;
	}

	public String getLinImg() {
		return this.linImg;
	}

	public void setLinImg(String linImg) {
		this.linImg = linImg;
	}

	public String getLinInterest() {
		return this.linInterest;
	}

	public void setLinInterest(String linInterest) {
		this.linInterest = linInterest;
	}

	public String getLinName() {
		return this.linName;
	}

	public void setLinName(String linName) {
		this.linName = linName;
	}

	public String getLinPhone() {
		return this.linPhone;
	}

	public void setLinPhone(String linPhone) {
		this.linPhone = linPhone;
	}

	public String getLinRemark() {
		return this.linRemark;
	}

	public void setLinRemark(String linRemark) {
		this.linRemark = linRemark;
	}

	public String getLinResponsible() {
		return this.linResponsible;
	}

	public void setLinResponsible(String linResponsible) {
		this.linResponsible = linResponsible;
	}

	public int getLinShow() {
		return this.linShow;
	}

	public void setLinShow(int linShow) {
		this.linShow = linShow;
	}

	public String getLinTitle() {
		return this.linTitle;
	}

	public void setLinTitle(String linTitle) {
		this.linTitle = linTitle;
	}

	public String getLinTrait() {
		return this.linTrait;
	}

	public void setLinTrait(String linTrait) {
		this.linTrait = linTrait;
	}

	public String getLinWeChat() {
		return this.linWeChat;
	}

	public void setLinWeChat(String linWeChat) {
		this.linWeChat = linWeChat;
	}

	public String getLinWorkPhone() {
		return this.linWorkPhone;
	}

	public void setLinWorkPhone(String linWorkPhone) {
		this.linWorkPhone = linWorkPhone;
	}

	public String getLinYearIncome() {
		return this.linYearIncome;
	}

	public void setLinYearIncome(String linYearIncome) {
		this.linYearIncome = linYearIncome;
	}
	@JsonBackReference
	public List<Anniversary> getAnniversaries() {
		return this.anniversaries;
	}
	@JsonBackReference
	public void setAnniversaries(List<Anniversary> anniversaries) {
		this.anniversaries = anniversaries;
	}
	@JsonBackReference
	public Anniversary addAnniversary(Anniversary anniversary) {
		getAnniversaries().add(anniversary);
		anniversary.setLinkman(this);

		return anniversary;
	}
	@JsonBackReference
	public Anniversary removeAnniversary(Anniversary anniversary) {
		getAnniversaries().remove(anniversary);
		anniversary.setLinkman(null);

		return anniversary;
	}
	@JsonBackReference
	public List<Backlog> getBacklogs() {
		return this.backlogs;
	}
	@JsonBackReference
	public void setBacklogs(List<Backlog> backlogs) {
		this.backlogs = backlogs;
	}
	@JsonBackReference
	public Backlog addBacklog(Backlog backlog) {
		getBacklogs().add(backlog);
		backlog.setLinkman(this);

		return backlog;
	}
	@JsonBackReference
	public Backlog removeBacklog(Backlog backlog) {
		getBacklogs().remove(backlog);
		backlog.setLinkman(null);

		return backlog;
	}
	@JsonBackReference
	public Addresdetail getAddresdetail() {
		return this.addresdetail;
	}
	@JsonBackReference
	public void setAddresdetail(Addresdetail addresdetail) {
		this.addresdetail = addresdetail;
	}
	@JsonBackReference
	public Customer getCustomer() {
		return this.customer;
	}
	@JsonBackReference
	public void setCustomer(Customer customer) {
		this.customer = customer;
	}
	@JsonBackReference
	public Dictionary getDictionary1() {
		return this.dictionary1;
	}
	@JsonBackReference
	public void setDictionary1(Dictionary dictionary1) {
		this.dictionary1 = dictionary1;
	}
	@JsonBackReference
	public Dictionary getDictionary2() {
		return this.dictionary2;
	}
	@JsonBackReference
	public void setDictionary2(Dictionary dictionary2) {
		this.dictionary2 = dictionary2;
	}
	@JsonBackReference
	public Dictionary getDictionary3() {
		return this.dictionary3;
	}
	@JsonBackReference
	public void setDictionary3(Dictionary dictionary3) {
		this.dictionary3 = dictionary3;
	}
	@JsonBackReference
	public Dictionary getDictionary4() {
		return this.dictionary4;
	}
	@JsonBackReference
	public void setDictionary4(Dictionary dictionary4) {
		this.dictionary4 = dictionary4;
	}
	@JsonBackReference
	public Dictionary getDictionary5() {
		return this.dictionary5;
	}
	@JsonBackReference
	public void setDictionary5(Dictionary dictionary5) {
		this.dictionary5 = dictionary5;
	}
	@JsonBackReference
	public TArea getTArea() {
		return this.TArea;
	}
	@JsonBackReference
	public void setTArea(TArea TArea) {
		this.TArea = TArea;
	}
	@JsonBackReference
	public List<Opportunity> getOpportunitys() {
		return this.opportunitys;
	}
	@JsonBackReference
	public void setOpportunitys(List<Opportunity> opportunitys) {
		this.opportunitys = opportunitys;
	}
	@JsonBackReference
	public Opportunity addOpportunity(Opportunity opportunity) {
		getOpportunitys().add(opportunity);
		opportunity.setLinkman(this);

		return opportunity;
	}
	@JsonBackReference
	public Opportunity removeOpportunity(Opportunity opportunity) {
		getOpportunitys().remove(opportunity);
		opportunity.setLinkman(null);

		return opportunity;
	}
	@JsonBackReference
	public List<Orderform> getOrderforms() {
		return this.orderforms;
	}
	@JsonBackReference
	public void setOrderforms(List<Orderform> orderforms) {
		this.orderforms = orderforms;
	}
	@JsonBackReference
	public Orderform addOrderform(Orderform orderform) {
		getOrderforms().add(orderform);
		orderform.setLinkman(this);

		return orderform;
	}
	@JsonBackReference
	public Orderform removeOrderform(Orderform orderform) {
		getOrderforms().remove(orderform);
		orderform.setLinkman(null);

		return orderform;
	}
	@JsonBackReference
	public List<Repairlist> getRepairlists() {
		return this.repairlists;
	}
	@JsonBackReference
	public void setRepairlists(List<Repairlist> repairlists) {
		this.repairlists = repairlists;
	}
	@JsonBackReference
	public Repairlist addRepairlist(Repairlist repairlist) {
		getRepairlists().add(repairlist);
		repairlist.setLinkman(this);

		return repairlist;
	}
	@JsonBackReference
	public Repairlist removeRepairlist(Repairlist repairlist) {
		getRepairlists().remove(repairlist);
		repairlist.setLinkman(null);

		return repairlist;
	}
	@JsonBackReference
	public List<Service> getServices() {
		return this.services;
	}
	@JsonBackReference
	public void setServices(List<Service> services) {
		this.services = services;
	}
	@JsonBackReference
	public Service addService(Service service) {
		getServices().add(service);
		service.setLinkman(this);

		return service;
	}
	@JsonBackReference
	public Service removeService(Service service) {
		getServices().remove(service);
		service.setLinkman(null);

		return service;
	}

	@Override
	public String toString() {
		return "Linkman [linId=" + linId + ", linCharacter=" + linCharacter + ", linDepartment=" + linDepartment

				+ ", linDuty=" + linDuty + ", linEmail=" + linEmail + ", linHabit=" + linHabit + ", linHobby="
				+ linHobby + ", linHomePhone=" + linHomePhone + ",  linIdCard="
				+ linIdCard + ", linImg=" + linImg + ", linInterest=" + linInterest + ", linName=" + linName
				+ ", linPhone=" + linPhone + ", linRemark=" + linRemark + ", linResponsible=" + linResponsible
				+ ", linShow=" + linShow + ", linTitle=" + linTitle + ", linTrait=" + linTrait + ", linWeChat="
				+ linWeChat + ", linWorkPhone=" + linWorkPhone + ", linYearIncome=" + linYearIncome + "]";
	}

	
	
}